package com.aop.aspectj;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestAspect {
	
	public static void main(String[] args) {
		
		//创建spring的IOC容器
		ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
		
		//从IOC容器中获取bean的实例
		ArithmeticCalculator ac=ctx.getBean(ArithmeticCalculator.class);
		
		//使用bean
		ac.add(3, 4);
		ac.mul(2, 4);
	}
	
}
